package cn.edu.imau.zy.system.feign;

import cn.edu.imau.zy.common.annotation.LoginUser;
import cn.edu.imau.zy.common.constant.ServiceNameConstants;
import cn.edu.imau.zy.common.core.domain.R;
import cn.edu.imau.zy.common.core.entity.system.SysClasses;
import cn.edu.imau.zy.common.core.entity.system.SysUser;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * 班级 Feign服务层
 */
@FeignClient(name = ServiceNameConstants.SYSTEM_SERVICE)
public interface RemoteClassesService
{
    @GetMapping("classes/get/{classesId}")
    SysClasses getClassesById(@PathVariable("classesId") String classesId);

    /**
     * 批量保存班级
     */
    @PostMapping("classes/saveList")
    R saveList(@RequestBody List<SysClasses> classes);

    /**
     * 查询班级列表
     */
    @GetMapping("classes/jlist")
    List<SysClasses> jList();
}
